package de.koller.million.grid.engine.enc;

import de.koller.million.grid.GNode;
import de.koller.million.grid.engine.player.NPC;
import de.koller.million.grid.engine.player.Player;
import java.util.ArrayList;
import java.util.List;

public class Encounter extends GNode {
	
	public final List<Player> raid = new ArrayList<>();
	public final List<NPC> npcs = new ArrayList<>();
	
	public void step( int elapsedTime ) {
		for( NPC n : npcs )
			n.step( elapsedTime );
	}
	
	public Player getPlayerAt( int slot, int side ) {
		if( side == 1 )
			try {
				return npcs.get( slot );
			} catch( ArrayIndexOutOfBoundsException ex ) {
				return null;
			}
		
		return null;
	}
}
